package com.scap.dfs.model;

import java.io.Serializable;

import javax.persistence.*;

import java.math.BigDecimal;


/**
 * The persistent class for the DAILY_CAL_FORMULA_CONFIG database table.
 * 
 */
@Entity
@Table(name="DAILY_CAL_FORMULA_CONFIG")
@NamedQuery(name="DailyCalFormulaConfig.findAll", query="SELECT d FROM DailyCalFormulaConfig d")
public class DailyCalFormulaConfig implements Serializable {
	private static final long serialVersionUID = 1L;

	@EmbeddedId
	private DailyCalFormulaConfigPK id;

	@Column(name="SHARING_BAHT",columnDefinition="numeric(19, 2)")
	private BigDecimal sharingBaht;

	@Column(name="SHARING_PERCENT",columnDefinition="numeric(19, 2)")
	private Double sharingPercent;

	@Column(name="TAX_TYPE",columnDefinition="nvarchar(10)")
	private String taxType;

	@Column(name="UPDATE_DATE",columnDefinition="nvarchar(20)")
	private String updateDate;

	@Column(name="UPDATE_TIME",columnDefinition="nvarchar(20)")
	private String updateTime;
	
	@Column(name="TAX_REVENUE",columnDefinition="nvarchar(10)")
	private String taxRevenue;
	
	@Column(name="TAX_RATE",columnDefinition="numeric(19, 2)")
	private BigDecimal taxRate;
	
	@Column(name="IS_GUARANTEE",columnDefinition="nvarchar(1)")
	private String isGuarantee;
	
	@Column(name="IS_GUARANTEE_FROM_ALLOC",columnDefinition="nvarchar(1)")
	private String isGuaranteeFromAlloc;

	public DailyCalFormulaConfig() {
	}

	public DailyCalFormulaConfigPK getId() {
		return this.id;
	}

	public void setId(DailyCalFormulaConfigPK id) {
		this.id = id;
	}

	public BigDecimal getSharingBaht() {
		return this.sharingBaht;
	}

	public void setSharingBaht(BigDecimal sharingBaht) {
		this.sharingBaht = sharingBaht;
	}

	public Double getSharingPercent() {
		return this.sharingPercent;
	}

	public void setSharingPercent(Double sharingPercent) {
		this.sharingPercent = sharingPercent;
	}

	public String getTaxType() {
		return this.taxType;
	}

	public void setTaxType(String taxType) {
		this.taxType = taxType;
	}

	public String getUpdateDate() {
		return this.updateDate;
	}

	public String getUpdateTime() {
		return this.updateTime;
	}

	public void setUpdateDate(String updateDate) {
		this.updateDate = updateDate;
	}

	public void setUpdateTime(String updateTime) {
		this.updateTime = updateTime;
	}

	public String getTaxRevenue() {
		return taxRevenue;
	}

	public void setTaxRevenue(String taxRevenue) {
		this.taxRevenue = taxRevenue;
	}

	public BigDecimal getTaxRate() {
		return taxRate;
	}

	public void setTaxRate(BigDecimal taxRate) {
		this.taxRate = taxRate;
	}

	public String getIsGuarantee() {
		return isGuarantee;
	}

	public void setIsGuarantee(String isGuarantee) {
		this.isGuarantee = isGuarantee;
	}

	public String getIsGuaranteeFromAlloc() {
		return isGuaranteeFromAlloc;
	}

	public void setIsGuaranteeFromAlloc(String isGuaranteeFromAlloc) {
		this.isGuaranteeFromAlloc = isGuaranteeFromAlloc;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((id == null) ? 0 : id.hashCode());
		result = prime * result
				+ ((isGuarantee == null) ? 0 : isGuarantee.hashCode());
		result = prime
				* result
				+ ((isGuaranteeFromAlloc == null) ? 0 : isGuaranteeFromAlloc
						.hashCode());
		result = prime * result
				+ ((sharingBaht == null) ? 0 : sharingBaht.hashCode());
		result = prime * result
				+ ((sharingPercent == null) ? 0 : sharingPercent.hashCode());
		result = prime * result + ((taxRate == null) ? 0 : taxRate.hashCode());
		result = prime * result
				+ ((taxRevenue == null) ? 0 : taxRevenue.hashCode());
		result = prime * result + ((taxType == null) ? 0 : taxType.hashCode());
		result = prime * result
				+ ((updateDate == null) ? 0 : updateDate.hashCode());
		result = prime * result
				+ ((updateTime == null) ? 0 : updateTime.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		DailyCalFormulaConfig other = (DailyCalFormulaConfig) obj;
		if (id == null) {
			if (other.id != null)
				return false;
		} else if (!id.equals(other.id))
			return false;
		if (isGuarantee == null) {
			if (other.isGuarantee != null)
				return false;
		} else if (!isGuarantee.equals(other.isGuarantee))
			return false;
		if (isGuaranteeFromAlloc == null) {
			if (other.isGuaranteeFromAlloc != null)
				return false;
		} else if (!isGuaranteeFromAlloc.equals(other.isGuaranteeFromAlloc))
			return false;
		if (sharingBaht == null) {
			if (other.sharingBaht != null)
				return false;
		} else if (!sharingBaht.equals(other.sharingBaht))
			return false;
		if (sharingPercent == null) {
			if (other.sharingPercent != null)
				return false;
		} else if (!sharingPercent.equals(other.sharingPercent))
			return false;
		if (taxRate == null) {
			if (other.taxRate != null)
				return false;
		} else if (!taxRate.equals(other.taxRate))
			return false;
		if (taxRevenue == null) {
			if (other.taxRevenue != null)
				return false;
		} else if (!taxRevenue.equals(other.taxRevenue))
			return false;
		if (taxType == null) {
			if (other.taxType != null)
				return false;
		} else if (!taxType.equals(other.taxType))
			return false;
		if (updateDate == null) {
			if (other.updateDate != null)
				return false;
		} else if (!updateDate.equals(other.updateDate))
			return false;
		if (updateTime == null) {
			if (other.updateTime != null)
				return false;
		} else if (!updateTime.equals(other.updateTime))
			return false;
		return true;
	}

	@Override
	public String toString() {
		return "DailyCalFormulaConfig [id=" + id + ", sharingBaht="
				+ sharingBaht + ", sharingPercent=" + sharingPercent
				+ ", taxType=" + taxType + ", updateDate=" + updateDate
				+ ", updateTime=" + updateTime + ", taxRevenue=" + taxRevenue
				+ ", taxRate=" + taxRate + ", isGuarantee=" + isGuarantee
				+ ", isGuaranteeFromAlloc=" + isGuaranteeFromAlloc + "]";
	}

	
	
	

}